package com.zj.config;

import com.zj.pojo.Car;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {

    @Bean
    @ConfigurationProperties(prefix = "mycar")//使用方式3
    public Car getCar() {
        return new Car();
    }
}
